@extends('default.layouts.companyPublic')

@section('title', '编辑部门')
@section('headcss')
    @parent
    <link rel="stylesheet" href="{{asset('/default/css/company/form.css')}}">
@endsection

@section('rightcon')

    <div class="right">
        <div class="jright">
            <div class="content">
                <div class="jobtitle">
                    <div class="tithead">
                        <ul>
                            <li><a href="{{url('company/basic_info')}}">基本资料</a></li>
                            <li class="active"><a href="{{url('company/department')}}">部门管理</a></li>
                            <li><a href="{{url('company/map')}}">地图坐标</a></li>
                            <li><a href="{{url('company/photo')}}">企业相册</a></li>
                        </ul>
                    </div>
                </div>
                <div class="nav_totitle">
                    <span class="line"><span>编辑部门</span></span>
                </div>
                <div class="manage" style="padding: 0; margin-bottom: 10px;">
                    @if(count($errors)>0)
                        <div class="mark">
                            @if(is_object($errors))
                                @foreach($errors->all() as $error)
                                    <p>{{$error}}</p>
                                @endforeach
                            @else
                                <p>{{$errors}}</p>
                            @endif
                        </div>
                    @endif
                </div>

                <div class="department">
                    <form name="departmentform" id="departmentform"
                          action="{{url('company/department/'.$CompanyDepartment->id)}}" onsubmit="return false"
                          method="post" novalidate>
                        {!! csrf_field() !!}{!!method_field('PUT')!!}
                        <dl>
                            <dt>
                                <em>*</em>
                                <span>部门名称</span>
                            </dt>
                            <dd>
                                <input name="name" type="text" id="name" value="{{$CompanyDepartment->name}}"
                                       style="width:260px;"/>
                            </dd>
                            <dd class="errinfo"></dd>
                        </dl>
                        <dl>
                            <dt>
                                <em>*</em>
                                <span>联系人</span>
                            </dt>
                            <dd>
                                <input name="contacts" type="text" id="contacts"
                                       value="{{$CompanyDepartment->contacts}}" style="width:120px;"/>
                            </dd>
                            <dd class="errinfo"></dd>
                        </dl>
                        <dl>
                            <dt>
                                <em>*</em>
                                <span>手机号码</span>
                            </dt>
                            <dd>
                                <input name="mobile" type="text" id="mobile" value="{{$CompanyDepartment->mobile}}"
                                       style="width:300px;"/>
                            </dd>
                            <dd class="errinfo"></dd>
                        </dl>
                        <dl>
                            <dt>
                                <em>*</em>
                                <span>电话</span>
                            </dt>
                            <dd>
                                <input name="phone" type="text" id="phone" value="{{$CompanyDepartment->phone}}"
                                       placeholder="格式例如 0576-82441111" style="width:200px;"/>
                            </dd>
                            <dd class="errinfo"></dd>
                        </dl>
                        <dl>
                            <dt>
                                <em></em>
                                <span>传真</span>
                            </dt>
                            <dd>
                                <input name="fax" type="text" id="fax" value="{{$CompanyDepartment->fax}}"
                                       style="width:200px;"/>
                            </dd>
                            <dd class="errinfo"></dd>
                        </dl>
                        <dl>
                            <dt>
                                <em></em>
                                <span>Email</span>
                            </dt>
                            <dd>
                                <input name="email" type="text" id="email" value="{{$CompanyDepartment->email}}"
                                       style="width:260px;"/>
                            </dd>
                            <dd class="errinfo"></dd>
                        </dl>
                        <div class="department_save">
                            <span><input type="submit" name="savenav" id="savenav" value="保 存"/></span>
                            <span><a href="javascript:history.go(-1);">取 消</a></span>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
@endsection
@section('footerjs')
    @parent
    <script type="text/javascript" src="{{asset('/default/js/company/department.js')}}"></script>
@endsection
